package com.pro.mapper;

import com.pro.pojo.*;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName:jurisdictionPeopleListMapper
 * Package:com.pro.mapper
 * Description:
 *
 * @Date:2021/11/15 15:56
 * @Author: XJR
 */

public interface JsPeopleListMapper {
    //查看部门名称
    public List<JsDept> selectJsDeptName();

    //查询后台用户信息
    public List<JsUser> selectJsUser(
            @Param("account") String account,
            @Param("trueName") String trueName,
            @Param("deptName") String deptName,
            @Param("registerDate") String registerDate,
            @Param("limit")Integer limit,
            @Param("page") Integer page
    );
    public Integer countJsUser(
            @Param("account") String account,
            @Param("trueName") String trueName,
            @Param("deptName") String deptName,
            @Param("registerDate") String registerDate
    );

    //更改账号状态
    public Boolean updateStatus(JsUser jsUser);
    //将解封后的账号添加到解封日志中
    public Boolean insertUnseal(Integer userId,Integer type,String unsealDate);
    //解封后封停日志封停结束时间改为当前的时间
    public Boolean updateUserEndDate(Integer id,Integer userId,String endDate);

    //高级检索
    public List<JsUser> selectSearchJsUser(
            @Param("email") String email,
            @Param("phone") String phone,
            @Param("idCard") String idCard,
            @Param("status") String status,
            @Param("sex") String sex,
            @Param("enabled") String enabled,
            @Param("limit")Integer limit,
            @Param("page") Integer page
    );
    public Integer countSearchJsUser(
            @Param("email") String email,
            @Param("phone") String phone,
            @Param("idCard") String idCard,
            @Param("status") String status,
            @Param("sex") String sex,
            @Param("enabled") String enabled
    );
    //通过id查询用户数据详情
    public JsUser selectJsUserById(Integer id);
    public Integer countJsUserById(Integer id);

    //通过id查看用户的权限
    public List<JsUser> selectUserSettings(Integer userId);

    //更改后台用户账号状态
    public Boolean updateUserStatus(Integer userId,Integer status,Integer enabled);

    //对后台用户账户进行封停
    public Boolean insertUserClosure(JsClosure jsClosure);

    //对后台用户账户进行编辑
    public Boolean updateUser(JsUser jsUser);

    //添加后台管理人员
    public Boolean addUser(JsUser jsUser);
    //添加后台权限
    public Boolean addUserStatus(List<JsUser> jsUser);

    //删除后台权限
    public Boolean delUserStatus(Integer userId);
}
